<?php

/**
 * Game form.
 *
 * @package    bgMicroLeague
 * @subpackage form
 * @author     Your name here
 */
class GameForm extends BaseGameForm
{
  public function configure()
  {
    unset(
      $this['used_pts_formula'],
      $this['created_at'],
      $this['updated_at'],
      $this['deleted_at']
    );

    $this->widgetSchema['date']->setOption('format', "%day%/%month%/%year%");
    $this->widgetSchema['id_place']->setOption('order_by', array("Name", "ASC"));
    $this->widgetSchema['id_boardgame']->setOption('order_by', array("Name", "ASC"));
    $this->widgetSchema['id_league']->setOption('order_by', array("Name", "ASC"));

    $this->embedRelation('PlayerGame');
  }
}
